Project 1¶

Part 1: Prospective and orthographic projections¶

Question 1¶

Perspective¶

Perspective

Orthographic¶

Orthographic

In the perspective projection image, the edges of the laptop appear to converge toward a vanishing point. This results in the image appearing to have a sense of distance. In the orthographic projection image, these same laptop edges seem to look parallel. This reduces the depth distortion and makes the scene appear flatter. This highlights how perspective projection exaggerates convergence, while orthographic projection preserves parallelism.¶

Part 2: Histogram Manipulation & Linear Fitting¶

(a) Histogram Equalization on Provided Images¶

Question 1¶

(b) Creative Task: Apply to Your Own Images¶

Question 2¶

Histogram equalization stretched the intensity distribution from a narrow range to cover more of 0–255. Shadows and highlights separated more clearly, increasing local contrast. In this image, the equalized version appears [cleaner / more detailed in dark regions / slightly harsh in highlights]. Overall, I think the quality [improved / improved moderately / over-enhanced noise in flat areas], which matches the histogram spreading we see.

(c) Optional Challenge: Histogram Matching (optional)¶

Question 3¶

(d) Derivative of Gaussian¶

Question 4¶

The naive method (Gaussian → derivative) and the DoG method should look nearly identical in both x and y directions.

Small differences can appear due to:

Discretization of the derivative (finite differences vs the continuous derivative),

Kernel size/truncation (we use ±3σ support),

Boundary handling (we used reflect padding),

Slight normalization differences between [-1,0,1] and the DoG scaling.

(e) Creative Task: Image Sharpening¶

Question 5¶

We implemented unsharp masking by smoothing with a Gaussian (σ = 1.2), subtracting to obtain the high-frequency component, and adding it back with weights α ∈ {1,2,4,8,10}. For both CT and moon images, moderate α (≈2–4) improved perceived sharpness without obvious artifacts. At high α (≥8), sharpening introduced halos along strong edges and amplified background noise, confirming the trade-off between acutance and artifact visibility. Adjusting σ shifts which structures are enhanced: smaller σ emphasizes fine texture/noise, while larger σ targets broader edges.

Part 3: Anisotropic Diffusion (Graduate Students)¶

Question 1¶

Smaller K protects more edges (less diffusion near gradients) but denoises less; larger K smooths more broadly and can round edges. More iterations/Δt ⇒ stronger smoothing.

Question 2¶

Gaussian smoothing reduces noise but blurs across edges, softening boundaries. Perona–Malik diffusivity drops near large gradients, so it denoises within regions while preserving/Sharpening edges (piecewise-smooth look). Differences also depend on parameters (σ vs K, iterations, Δt) and boundary handling.

Question 3 (optional)¶

Limitations of anisotropic diffusion (Perona–Malik)

Parameter sensitivity: Results hinge on 𝐾 K, Δ 𝑡 Δt, and the iteration count; small changes can under/over-smooth and there’s no built-in stopping rule.

Texture loss / cartooning: Fine textures and low-contrast edges are often treated as noise and flattened (piecewise-constant look).

Edge leakage & shift: If gradients are weak relative to 𝐾 K, diffusion can still cross edges, softening or shifting boundaries.

Discretization issues: 4-neighbour schemes aren’t perfectly rotation-invariant; explicit updates require small Δ 𝑡 Δt (slow) and can create boundary artifacts.

Noise model mismatch: Works best for roughly Gaussian noise; speckle/impulse noise is handled poorly.

One improvement: Structure-tensor–guided (coherence-enhancing) diffusion

Instead of using a scalar conductance based only on ∣ ∇ 𝐼 ∣ ∣∇I∣, estimate local orientation with the structure tensor 𝐽

𝜌¶

𝐺 𝜌 ∗ ( ∇ 𝐼 𝜎 ∇ 𝐼 𝜎 ⊤ ) J ρ ​

=G ρ ​

∗(∇I σ ​

∇I σ ⊤ ​

). Diagonalize 𝐽 𝜌 J ρ ​

to get dominant directions; then diffuse strongly along coherent directions (within edges/lines) and weakly across them via a diffusion tensor

𝐷¶

𝑅   d i a g ( 𝛼 , 𝛽 )   𝑅 ⊤ D=Rdiag(α,β)R ⊤ with 𝛼 ≫ 𝛽 α≫β. This preserves thin/elongated structures and reduces edge blurring/leakage compared with PM.

Why it helps: PM only knows “how strong is the gradient?”; coherence-enhancing diffusion also knows “which way does the structure run?”, so it smooths noise in the safe direction while protecting edge normal directions—better on textures, ridges, vessels, wood grain, etc.